diff --git a/Makefile b/Makefile
index 212644e..93e0af8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 
 TARGET			= aphex
 
-CC			= gcc
-CFLAGS			= -Wall -ggdb -std=c99 -pedantic -Wno-switch
+CC			?= gcc
+CFLAGS			?= -Wall -ggdb -std=c99 -pedantic -Wno-switch -fcommon
 
 PREFIX			?= /usr
 BINPREFIX		= $(PREFIX)/bin
diff --git a/input.c b/input.c
index a7af4bf..f2716d4 100644
--- a/input.c
+++ b/input.c
@@ -32,6 +32,14 @@ void aphexInputProcess()
 			aphexCursorSetYUp(comNum);
 			resetComBuf();
 			break;
+    case (CURSOR_PAGE_UP):
+			aphexCursorSetYUp(comNum + winBase.height);
+			resetComBuf();
+      break;
+    case (CURSOR_PAGE_DOWN):
+			aphexCursorSetYDown(comNum + winBase.height);
+			resetComBuf();
+      break;
 		case (CURSOR_LEFT):
 			aphexCursorSetXLeft(comNum);
 			resetComBuf();
@@ -120,6 +128,10 @@ aphexCom parseComBuf(char c)
 				return CURSOR_RIGHT;
 			case ('g'):
 				return CURSOR_TOP;
+      case ('f'):
+        return CURSOR_PAGE_DOWN;
+      case ('b'):
+        return CURSOR_PAGE_UP;
 
 				/* commands ignoring comBuf*/
 			case ('i'):
@@ -128,13 +140,13 @@ aphexCom parseComBuf(char c)
 				return APHEX_DELETE_COMBUF;
 			case (0x09):
 				return APHEX_CYCLE_EDIT_MODE;
-			case ('Q'):
+			case ('q'):
 				return QUIT;
 			case ('G'):
 				return CURSOR_BOTTOM;
 			case ('$'):
 				return CURSOR_END;
-			case ('q'):
+			case ('Q'):
 				return APHEX_REDRAW;
 			case ('0'):
 				if (comIndex == 0) {
diff --git a/input.h b/input.h
index 4ed71f6..d4b48ab 100644
--- a/input.h
+++ b/input.h
@@ -5,7 +5,7 @@ typedef enum { APHEX_EDIT_ASCII = 'A', APHEX_EDIT_BIN = 'B', APHEX_EDIT_HEX = 'H
 	APHEX_COMMAND_MODE = 'C', APHEX_INSERT_MODE = 'I', APHEX_READONLY_MODE = 'R',
 	APHEX_CYCLE_EDIT_MODE,
 	CURSOR_UP, CURSOR_DOWN, CURSOR_LEFT, CURSOR_RIGHT, CURSOR_BOTTOM, CURSOR_TOP, CURSOR_HOME, CURSOR_END,
-	APHEX_REDRAW, APHEX_DELETE_COMBUF,
+	APHEX_REDRAW, APHEX_DELETE_COMBUF, CURSOR_PAGE_DOWN, CURSOR_PAGE_UP,
 	QUIT, NONE
 } aphexCom;
 
